package com.b2mining.daemons;

import java.util.ArrayList;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

import com.b2mining.integration.controllers.XMLEmpresasController;

public class IntegracionSFTPMultiempresa{
    public static ArrayList empresas=new ArrayList();
	static 
    {
         PropertyConfigurator.configure("log4j.properties");
    }
    Logger log = Logger.getLogger(this.getClass());
    static TXTController txtController;
    static MQController mqController;
    
    /**	
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    	   XMLEmpresasController empController; 
    		empController = XMLEmpresasController.getInstance();
    	    empresas = empController.getEmpresas();
        Logger log2 = Logger.getLogger(IntegracionSFTPMultiempresa.class);

         try {
        	 log2.info("Iniciando TXTController ... ");
             txtController = TXTController.getInstance("TXTController B2M");
             txtController.start();
             
             log2.info("Iniciando MQController ... ");
             mqController = MQController.getInstance("MQController B2M");
             mqController.start();
             mqController.join();
		} catch (Exception e) {
			// TODO: handle exception
		}
    }
}
